import request from '@/config/axios'

// 就业方向 VO
export interface EmploymentDirVO {
  id: number // 主键id
  name: string // 内容
  schools: string // 对口院校id
  status: number // 状态
  sort: number // 排序
}

// 就业方向 API
export const EmploymentDirApi = {
  // 查询就业方向分页
  getEmploymentDirPage: async (params: any) => {
    return await request.get({ url: `/kf/employment-dir/page?pageNo=1&pageSize=100`, params })
  },

  // 查询就业方向详情
  getEmploymentDir: async (id: number) => {
    return await request.get({ url: `/kf/employment-dir/get?id=` + id })
  },

  // 新增就业方向
  createEmploymentDir: async (data: EmploymentDirVO) => {
    return await request.post({ url: `/kf/employment-dir/create`, data })
  },

  // 修改就业方向
  updateEmploymentDir: async (data: EmploymentDirVO) => {
    return await request.put({ url: `/kf/employment-dir/update`, data })
  },

  // 删除就业方向
  deleteEmploymentDir: async (id: number) => {
    return await request.delete({ url: `/kf/employment-dir/delete?id=` + id })
  },

  // 导出就业方向 Excel
  exportEmploymentDir: async (params) => {
    return await request.download({ url: `/kf/employment-dir/export-excel`, params })
  },
}
